package com.cskaoyan.catmall.model.vo;

import com.cskaoyan.catmall.model.pojo.MarketComment;
import lombok.Data;

import java.util.List;

/**
 * 评论列表
 * 创建日期: 2022/01/09 17:07
 *
 * @author ghr
 */
@Data
public class CommentVo {
    private Integer page;
    private Integer pages;
    private Integer total;
    private Integer limit;
    private List<MarketComment> list;

    public static CommentVo commentVo(long total, Integer pages, Integer limit, Integer page, List list) {
        CommentVo commentVo = new CommentVo();
        commentVo.setTotal((int) total);
        commentVo.setLimit(limit);
        commentVo.setPage(page);
        commentVo.setPages(pages);
        commentVo.setList(list);
        return commentVo;
    }
}